//
//  Response.m
//  post
//
//  Created by Hyo Jung Lee on 11. 12. 30..
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#import "Response.h"

@implementation Response

@synthesize responseDictionary;


- (id) initWidhDictionary:(NSDictionary*)dictionary
{
    if ([super init]) {
        self.responseDictionary = dictionary;
    }
    return self;
}


- (void) checkValidation
{
    NSAssert(responseDictionary, @"responseDictionary is nil");
}


- (int) result
{
    [self checkValidation];
    return [[responseDictionary objectForKey:KEY_RESULT] intValue];
}

- (NSString*) message
{
    [self checkValidation];
    return [responseDictionary objectForKey:KEY_MESSAGE];
}


@end
